// use crate::const_v::arr_enum::staff;

pub mod staff_mod {
    use crate::const_v::arr_enum::staff::StaffEnum;
    use std::collections::HashMap;
    #[derive(Debug)]
    pub struct Company {
        department: HashMap<String, Vec<String>>,
    }

    impl Company {
        pub fn new() -> Self {
            Company {
                department: HashMap::new(),
            }
        }
        pub fn add(&mut self, name: String, department: String) {
            self.department
                .entry(department)
                .or_insert(vec![])
                .push(name)
        }
        pub fn get_department(&self, department_name: String) -> Option<Vec<String>> {
            let res: Option<&Vec<String>> = self.department.get(&department_name);
            let res: Option<Vec<String>> = res.cloned();

            if let Some(mut vec) = res {
                vec.sort();
                return Some(vec);
            } else {
                return None;
            }

            // match res {
            //     Some(vec) => println!("{:?}", vec),
            //     None => println!("None"),
            // }
        }
    }
}
